import React from "react";
export default class Field extends React.Component{
    state={
        value:''
    }
    clear(){
        this.setState({
            value:''
        })
    }

    render(){
        return(
            <div>
                <label>{this.props.label}</label>
                <input value={this.state.value} type={this.props.type} onChange={(e)=>{
                    this.setState({value:e.target.value})
                }}/>
            </div>
        )
    }
}